package com.beyond.trace.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * 产品信息对象 t_trace_product
 * 
 * @author yao
 * @date 2022-03-02
 */
@Data
@TableName("t_trace_product")
public class TraceProduct extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(value = "product_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long productId;

    /** 产品编号 */
    @Excel(name = "产品编号")
    @ApiModelProperty(value = "产品编号")
    private String productNo;

    /** 产品名称 */
    @Excel(name = "产品名称")
    @ApiModelProperty(value = "产品名称")
    @NotEmpty(message = "产品名称不能为空")
    private String productName;

    /** 种植地块 */
    @Excel(name = "种植地块")
    @ApiModelProperty(value = "种植地块")
    private String productLand;

    /** 产品类型 */
    @Excel(name = "产品类型")
    @ApiModelProperty(value = "产品类型")
    private String productType;

    /** 预计产量 */
    @Excel(name = "预计产量")
    @ApiModelProperty(value = "预计产量")
    @Size(min = 0,max = 15,message = "预计产量不能超过15个字符")
    private String productEstimateCount;

    /** 产品规格 */
    @Excel(name = "产品规格")
    @ApiModelProperty(value = "产品规格")
    private String productSize;

    /** 产品重量 */
    @Excel(name = "产品重量")
    @ApiModelProperty(value = "产品重量")
    @Size(min = 0,max = 15,message = "预计产量不能超过15个字符")
    private String productWeight;

    /** 保质期 */
    @Excel(name = "保质期")
    @ApiModelProperty(value = "保质期")
    @Size(min = 0,max = 10,message = "保质期不能超过10个字符")
    private String productGuaranteePeriod;

    /** 存储方式 */
    @Excel(name = "存储方式")
    @ApiModelProperty(value = "存储方式")
    private String productStorage;

    /** 生产许可证 */
    @Excel(name = "生产许可证")
    @ApiModelProperty(value = "生产许可证")
    private String productPermit;

    /** 图片地址 */
    @Excel(name = "图片地址")
    @ApiModelProperty(value = "图片地址")
    private String productPic;

    /** 产品介绍 */
    @Excel(name = "产品介绍")
    @ApiModelProperty(value = "产品介绍")
    private String productExplain;

    /** 负责人 */
    @Excel(name = "负责人")
    @ApiModelProperty(value = "负责人")
    private String productPerson;

    /** 负责人联系方式 */
    @Excel(name = "负责人联系方式")
    @ApiModelProperty(value = "负责人联系方式")
    private String productPersonPhone;

    /** 生产企业 */
    @Excel(name = "生产企业")
    @ApiModelProperty(value = "生产企业")
    private String productCompany;

    /** 生产企业地址 */
    @Excel(name = "生产企业地址")
    @ApiModelProperty(value = "生产企业地址")
    private String productCompanyAddress;

    /** 原材料地址 */
    @Excel(name = "原材料地址")
    @ApiModelProperty(value = "原材料地址")
    private String productMaterialAddress;

    /** 产品追溯评分 */
    @Excel(name = "产品追溯评分")
    @ApiModelProperty(value = "产品追溯评分")
    private BigDecimal productTraceRate;

    /** 产品用户评分 */
    @Excel(name = "产品用户评分")
    @ApiModelProperty(value = "产品用户评分")
    private BigDecimal productUserRate;

    /**
     * 记录此条数据生成二维码后被扫描的次数
     */
    @Excel(name = "扫描次数")
    private Integer count;

    @Excel(name = "部门id")
    @ApiModelProperty(value = "部门id")
    @JsonIgnore
    private String departId;

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setProductNo(String productNo) 
    {
        this.productNo = productNo;
    }

    public String getProductNo() 
    {
        return productNo;
    }
    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }
    public void setProductLand(String productLand)
    {
        this.productLand = productLand;
    }

    public String getProductLand()
    {
        return productLand;
    }
    public void setProductType(String productType)
    {
        this.productType = productType;
    }

    public String getProductType()
    {
        return productType;
    }
    public void setProductEstimateCount(String productEstimateCount)
    {
        this.productEstimateCount = productEstimateCount;
    }

    public String getProductEstimateCount()
    {
        return productEstimateCount;
    }
    public void setProductSize(String productSize) 
    {
        this.productSize = productSize;
    }

    public String getProductSize() 
    {
        return productSize;
    }
    public void setProductWeight(String productWeight)
    {
        this.productWeight = productWeight;
    }

    public String getProductWeight()
    {
        return productWeight;
    }
    public void setProductGuaranteePeriod(String productGuaranteePeriod)
    {
        this.productGuaranteePeriod = productGuaranteePeriod;
    }

    public String getProductGuaranteePeriod()
    {
        return productGuaranteePeriod;
    }
    public void setProductStorage(String productStorage) 
    {
        this.productStorage = productStorage;
    }

    public String getProductStorage() 
    {
        return productStorage;
    }
    public void setProductPermit(String productPermit) 
    {
        this.productPermit = productPermit;
    }

    public String getProductPermit() 
    {
        return productPermit;
    }
    public void setProductPic(String productPic) 
    {
        this.productPic = productPic;
    }

    public String getProductPic() 
    {
        return productPic;
    }
    public void setProductPerson(String productPerson) 
    {
        this.productPerson = productPerson;
    }

    public String getProductExplain()
    {
        return productExplain;
    }
    public void setProductExplain(String productExplain)
    {
        this.productExplain = productExplain;
    }

    public String getProductPerson() 
    {
        return productPerson;
    }
    public void setProductPersonPhone(String productPersonPhone) 
    {
        this.productPersonPhone = productPersonPhone;
    }

    public String getProductPersonPhone() 
    {
        return productPersonPhone;
    }

    public void setProductCompany(String productCompany)
    {
        this.productCompany = productCompany;
    }

    public String getProductCompany()
    {
        return productCompany;
    }
    public void setProductCompanyAddress(String productCompanyAddress)
    {
        this.productCompanyAddress = productCompanyAddress;
    }

    public String getProductCompanyAddress()
    {
        return productCompanyAddress;
    }
    public void setProductMaterialAddress(String productMaterialAddress)
    {
        this.productMaterialAddress = productMaterialAddress;
    }

    public String getProductMaterialAddress()
    {
        return productMaterialAddress;
    }
    public void setProductTraceRate(BigDecimal productTraceRate)
    {
        this.productTraceRate = productTraceRate;
    }

    public BigDecimal getProductTraceRate()
    {
        return productTraceRate;
    }
    public void setProductUserRate(BigDecimal productUserRate)
    {
        this.productUserRate = productUserRate;
    }

    public BigDecimal getProductUserRate()
    {
        return productUserRate;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("productId", getProductId())
            .append("productNo", getProductNo())
            .append("productName", getProductName())
            .append("productLand", getProductLand())
            .append("productType", getProductType())
            .append("productEstimateCount", getProductEstimateCount())
            .append("productSize", getProductSize())
            .append("productWeight", getProductWeight())
            .append("productGuaranteePeriod", getProductGuaranteePeriod())
            .append("productStorage", getProductStorage())
            .append("productPermit", getProductPermit())
            .append("productPic", getProductPic())
            .append("productExplain", getProductExplain())
            .append("productPerson", getProductPerson())
            .append("productPersonPhone", getProductPersonPhone())
            .append("productCompany", getProductCompany())
            .append("productCompanyAddress", getProductCompanyAddress())
            .append("productMaterialAddress", getProductMaterialAddress())
            .append("productTraceRate", getProductTraceRate())
            .append("productUserRate", getProductUserRate())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("count", getCount())
            .toString();
    }
}
